package com.woniuxy.project.campus;



import com.woniuxy.project.campus.account.model.form.*;
import com.woniuxy.project.campus.account.model.param.HashIncrementParam;
import com.woniuxy.project.campus.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;



import java.util.Set;

@FeignClient(name = "account-service")
public interface AccountOpenFeign {

    @PostMapping("/account/account/addMerchant")
     Result addMerchant(@RequestBody AccountForm accountForm);

    @GetMapping("/account/account/getUserInfo")
    Result getUserInfo(@RequestParam("id") Integer id);
    @GetMapping("/account/account/getSuperAdminId")
    Result getSuperAdminId();

    @GetMapping("/account/account/getUserInfoByMobile")
     Result getUserInfoByMobile(@RequestParam("mobile")String mobile);

    @PostMapping("/account/account/updateUserInfo")
    Result updateUserInfo( @RequestBody AccountForm account);

    @GetMapping("/account/account/getUserInfoById")
     Result getUserInfoById(@RequestParam("id") Integer id);

    @GetMapping("/account/roleAccount/getRoleId")
     Result getRoleId(@RequestParam("id") Integer id);



    @GetMapping("/account/roleAccount/updateRoleId")
     Result updateRoleId(@RequestParam("id") Integer id);


    @GetMapping("/account/account/getAllRepairPerson")
    Result getAllRepairPerson();


    @GetMapping("/account/account/getUserInfoByToken")
     Result getUserInfoByToken(@RequestParam("id") Integer id);




    @PostMapping("/account/redis/getString")
    Result getString(@RequestParam("key") String key) throws Exception;

    @PostMapping("/account/redis/set")
    Result set(@RequestBody StringKAndVForm form);

    @PostMapping("/account/redis/set1")
    Result set1(@RequestBody Set1Foram form);

    @PostMapping("/account/redis/delete")
    Result delete(@RequestParam("key") String key);

    @PostMapping("/account/redis/hasKey")
    Result hasKey(@RequestParam("key") String key);

    @PostMapping("/account/redis/ttl")
    Result ttl(@RequestParam("key") String key);

    @PostMapping("/account/redis/increment")
    Result increment(@RequestParam("key") String key);

    @PostMapping("/account/redis/redisManager/sadd")
    Result sadd(@RequestBody SaddForm form);

    @PostMapping("/account/redis/smembers")
    Set<String> smembers(@RequestParam("key") String key);

    @PostMapping("/account/redis/srem")
    Result srem(@RequestBody StringKAndVForm form);

    @PostMapping("/account/redis/score")
    Result score(@RequestBody StringKAndVForm form);

    @PostMapping("/account/redis/zadd")
    Result zadd(@RequestBody Set1Foram form);

    @PostMapping("/account/redis/zincrby")
    Result zincrby(@RequestBody Set1Foram form);

    @PostMapping("/account/redis/zrevrange")
    Result zrevrange(@RequestBody ZrevrangeForm form);

    @PostMapping("/account/redis/zcard")
    Long zcard(@RequestParam("key") String key);

    @PostMapping("/account/redis/zrem")
    Result zrem(@RequestBody StringKAndVForm form);

    @PostMapping("/account/redis/getZSetMembers")
    Result getZSetMembers(@RequestParam("key") String key);

    @PostMapping("/account/redis/setObject")
    Result setObject(@RequestBody SetObjectForm form) throws Exception;

    @PostMapping("/account/redis/setObject1")
    Result setObject1(@RequestBody SetObject1Form form) throws Exception;

    @PostMapping("/account/redis/getObject")
    Result getObject(@RequestParam("key") String key) throws Exception;

    @PostMapping("/account/redis/setHashMap")
    Result setHashMap(@RequestBody SetHashMapForm form) throws Exception;

    @PostMapping("/account/redis/hashIncrement")
    Result hashIncrement(@RequestBody HashIncrementParam form) throws Exception;

    @PostMapping("/account/redisget/HashMap")
    Result getHashMap(@RequestBody StringKAndVForm form) throws Exception;

    @PostMapping("/account/redis/getHashMapAll")
    Result getHashMapAll(@RequestParam("key") String key) throws Exception;

    @PostMapping("account/redis/deleteHashMap")
    Result deleteHashMap(@RequestParam("key") String key) throws Exception;

    @PostMapping("/account/redis/saveHashMap")
    Result saveHashMap(@RequestBody SaveHashMapForm form) throws Exception;

    @PostMapping("/account/redis/incrementCdoe")
    Long incrementCdoe(@RequestParam("key") String key);


}
